<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<h3>编辑合同下载模板</h3>
<form name="editContractForm" th:action="@{/contract/updateDownloadContract}" method="post"
      enctype="multipart/form-data">
    标题：<input type="text" name="name" th:value="${contract.name}"/></br>
    类型：<select name="contractType">
    <option value="销售合同" th:selected="${contract.contractType == '销售合同'}">销售合同</option>
    <option value="采购合同" th:selected="${contract.contractType == '采购合同'}">采购合同</option>
    <option value="保密合同" th:selected="${contract.contractType == '保密合同'}">保密合同</option>
    <!--其它合同类型-->
</select></br>
    简介：<textarea name="contractRecord.remark" th:text="${contract.contractRecord.remark}" rows="5"
                 cols="20"></textarea></br>
    附件：<a th:href="@{~/contract/download(id=${contract.att.id})}"
          th:text="${#strings.substringAfter(contract.att.name,'_')}">暂无</a><br/>
    <!--        附件预览：-->
    重传：<input type="file" name="uploadFile"/><br/>

    <input type="hidden" name="id" th:value="${contract.id}"/>
    <input type="hidden" name="contractRecord.id" th:value="${contract.contractRecord.id}"/>
    <input type="hidden" name="att.id" th:value="${contract.att.id}"/>

    <button type="submit">提交合同</button>
</form>


<!--合同下载模板详情-->
<div class="modal-body">
    <div>
        合同名称：<span th:text="${contract.name}">公司设立（新设）</span>
    </div>
    <div th:each="contractType:${contract.TYPE}" th:if="${contract.contractType == contractType}">
        合同类型：<span th:text="${contract.contractType}"></span>
    </div>
    <div>
        创建时间：<span th:text="${contract.createTime}">aaaa年bb月cc日dd时ee分</span>
    </div>
    <div>
        更新时间：<span th:text="${contract.updateTime}">yyyy年mm月dd日hh时mm分</span>
    </div>
    <div>
        创建人：<span th:text="${contract.createBy}">刘</span>
    </div>
    <div>
        修改人：<span th:text="${contract.updateBy}">赵</span>
    </div>
</div>

</body>
</html>